<?php
class Accounts extends Controller{
    
    function __construct(){
        parent::Controller();
        $this->load->helper('url');
        $this->load->helper('form');        
    }
    

    function index(){
//        $acc = new AccountModel();
        $this->load->model('Account_model');
        
        $data['accounts'] = $this->Account_model->get_accounts();               
        $this->load->view("admin/account_view",$data);
    }
    
    function create(){
        $this->load->model('Account_model');
        $id = $this->Account_model->createAccount();
        redirect('accounts/index');
    }
    
    function delete(){
        
    }
    
    function edit(){
        
    }
}

?>